<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        "use strict" // 严格模式 这个this不能指向window
        console.log(window);
        function foo() {
            console.log('foo', this);
        }
        foo()//window
        var obj = {
            name: "123",
            age: 19,
            bar: function () {
                console.log('bar', this);
            }
        }
        var baz = obj.bar
        baz()//window

    </script>
</body>

</html>